package com.jiwei.community.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jiwei.community.dto.PostDetailDto;
import com.jiwei.community.entity.Post;
import com.jiwei.community.vo.PostVo;
import org.apache.ibatis.annotations.Param;


/**
 * (Post)表数据库访问层
 *
 * @author jiwei
 * @since 2024-03-20 11:00:01
 */
public interface PostMapper extends BaseMapper<Post> {
    Page<PostVo> getPostList(@Param("page") Page<PostVo> page, @Param("communityId") Long communityId, @Param("sectionId") Integer sectionId, @Param("isTop") Integer isTop, @Param("isEssence") Integer isEssence);

    PostDetailDto getDetailById(@Param("postId") Long postId);

    Page<PostVo>  searchPost(@Param("page") Page<PostVo> page,@Param("title") String title,@Param("communityId") Long communityId);

    Page<PostVo> getMyPostList(@Param("page") Page<PostVo> page, @Param("userId") Long userId);
}

